package com.share.netdisk.user.service;

import com.baomidou.mybatisplus.extension.service.IService;

import com.share.constant.Result;
import com.share.netdisk.user.model.User;
import com.share.tdo.PhoneTdo;
import com.share.tdo.UserLoginTdo;
import com.share.tdo.UserRegisterTdo;
import org.springframework.http.ResponseEntity;

public interface UserService extends IService<User> {
    Result login(UserLoginTdo user);
    Result register(UserRegisterTdo user);
    Result isExist(String username);
    ResponseEntity<byte[]> generateCaptcha();
    boolean validateCaptcha();
    Result logout();

    Result loginByPhone(String phone, String code);

    Result getUserInfo();

    String getCaptcha(String phone);

    Result loginPhone(PhoneTdo phone);

    Result saveUser(User user);

    Result removeUserById(Long id);

    Result updateUser(User user);

    Result getUserByName(String username,Integer pageNum,   Integer pageSize);

    Result isExistPhone(String phone);
}
